package com.limanyik.family.gateway.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

@Configuration
public class UserMenusConfig {

    /**
     * 方向路径
     */
    @Value("${url.open}")
    public String openUrl;

    /**
     * 判断请求路径是否为开发路径
     *
     * @param url
     * @return
     */
    public boolean isOpenUrl(String url) {
        String[] openUrlArr = openUrl.split(",");
        for (int i = 0; i < openUrlArr.length; i++) {
            if (url.equals(openUrlArr[i])) {
                return true;
            }
        }
        return false;
    }

}
